package com.lm.iotdb.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.sql.Connection;
import java.sql.DriverManager;

@Configuration
public class IoTDBConfig {

    @Bean
    public Connection iotdbConnection() throws Exception {
        Class.forName("org.apache.iotdb.jdbc.IoTDBDriver");
        return DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root");
    }
}